﻿<UserControl x:Class="CodeAngel.UI.DatabaseControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:CodeAngel.UI"
             xmlns:system="clr-namespace:System;assembly=mscorlib"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    
    <UserControl.Resources>

        <system:Double x:Key="LABEL_WIDTH">70.0</system:Double>
        
    </UserControl.Resources>
    
    <Grid>
        <StackPanel >
            <local:LabeledTextBox Label="Name" Text="{Binding Database.Name}" LabelWidth="{StaticResource LABEL_WIDTH}" />
            <local:LabeledTextBox Label="Alias" Text="{Binding Database.UserFriendlyName}" LabelWidth="{StaticResource LABEL_WIDTH}" />
            <local:LabeledTextBox Label="Server" Text="{Binding Database.Server}" LabelWidth="{StaticResource LABEL_WIDTH}" />
            <local:LabeledTextBox Label="UserName" Text="{Binding Database.UserName}" LabelWidth="{StaticResource LABEL_WIDTH}" />
            <local:LabeledTextBox Label="Password" Text="{Binding Database.Password}" LabelWidth="{StaticResource LABEL_WIDTH}" />
            
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,8,0,0">
                <Button Content="Update" Command="{Binding UpdateSqlServerDatabaseCommand}"  />
                <Button Content="Create" Command="{Binding CreateSqlServerDatabaseCommand}" Margin="6,0,0,0" />
            </StackPanel>
        </StackPanel>
            
    </Grid>
</UserControl>
